﻿using System;
using System.IO;

namespace LabSolutions
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();            
            double a = double.Parse(input);
            double z1 = 2 * Math.Pow(Math.Sin(3 * Math.PI - 2 * a) * Math.Cos(5 * Math.PI + 2 * a), 2);
            double z2 = 1d / 4d - 1d / 4d * Math.Sin(5d / 2d * Math.PI - 8 * a);

                Console.WriteLine(z1.ToString("0.00000"));
                Console.Write(z2.ToString("0.00000"));

			throw new Exception("4");
			//Test #: 1
			//Result: Runtime Error
			//Message: Input: 0 Exception: 4 at 0:0
			
			//int[] ar = new int[3];
			//ar[5] = 6;
			//http://stackoverflow.com/questions/2999298/difference-between-throw-and-throw-new-exception
		}
    }
}
